package com.hmall.common.client;

import com.hmall.common.dto.Address;
import com.hmall.common.dto.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "userservice")
public interface UserClient {

    @GetMapping("/address/{id}")
    Address findAddressById(@PathVariable("id") Long id);
    @GetMapping("/user/{id}")
     User getUserById(@PathVariable Long id);
    @PutMapping("/user")
     void updateUser(@RequestBody User user);
}
